import React, {Component} from 'react'
import {Grid} from 'antd-mobile'

import {HotMenuWrap} from './styledComponent'



class HotMenuContainer extends Component {
    render() {
        console.log(this.props)
        let data = Object.keys(this.props.categorys).slice(0,7).map((item) => {
            return {
                icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
                text: item,
            }
        })
        if (data) {
            data.push({
                icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
                text: '更多',
            })
        }
        return (
            <HotMenuWrap>
                <h1>热门组件</h1>
                <Grid data={data} hasLine={false}/>
            </HotMenuWrap>
        )
    }
}

export default HotMenuContainer
